// @ts-ignore
/* eslint-disable */
import request from '@/utils/request'

/** 此处后端没有提供注释 POST /works/createWorks */
export async function createWorks(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: MediaService.createWorksParams,
  options?: { [key: string]: any }
) {
  return request<MediaService.ResultBizWorks>(`/media/works/createWorks`, {
    method: 'POST',
    params: {
      ...params,
      bizWorks: undefined,
      ...params['bizWorks'],
    },
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /works/deleteWorks */
export async function deleteWorks(body: number, options?: { [key: string]: any }) {
  return request<MediaService.ResultBizWorks>(`/media/works/deleteWorks`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 GET /works/getCollectionWorks */
export async function getCollectionWorks(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: MediaService.getCollectionWorksParams,
  options?: { [key: string]: any }
) {
  return request<MediaService.ResultListBizWorks>(`/media/works/getCollectionWorks`, {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 GET /works/getWorksById */
export async function getWorksById(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: MediaService.getWorksByIdParams,
  options?: { [key: string]: any }
) {
  return request<MediaService.ResultBizWorksVo>(`/media/works/getWorksById`, {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /works/getWorksList */
export async function getWorksList(
  body: MediaService.WorksPageQuery,
  options?: { [key: string]: any }
) {
  return request<MediaService.PageResultBizWorksVo>(`/media/works/getWorksList`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /works/getWorksListByUserId */
export async function getWorksListByUserId(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: MediaService.getWorksListByUserIdParams,
  options?: { [key: string]: any }
) {
  return request<MediaService.ResultListBizWorks>(`/media/works/getWorksListByUserId`, {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /works/getWorksListByUserIdForVisitor */
export async function getWorksListByUserIdForVisitor(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: MediaService.getWorksListByUserIdForVisitorParams,
  options?: { [key: string]: any }
) {
  return request<MediaService.ResultListBizWorks>(`/media/works/getWorksListByUserIdForVisitor`, {
    method: 'POST',
    params: {
      ...params,
    },
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /works/getWorksListForVisitor */
export async function getWorksListForVisitor(
  body: MediaService.WorksPageQuery,
  options?: { [key: string]: any }
) {
  return request<MediaService.PageResultBizWorksVo>(`/media/works/getWorksListForVisitor`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 GET /works/getWorksReviewList */
export async function getWorksReviewList(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: MediaService.getWorksReviewListParams,
  options?: { [key: string]: any }
) {
  return request<MediaService.PageResultBizWorksReviewVo>(`/media/works/getWorksReviewList`, {
    method: 'GET',
    params: {
      ...params,
      worksReviewPageQuery: undefined,
      ...params['worksReviewPageQuery'],
    },
    ...(options || {}),
  })
}

/** 此处后端没有提供注释 POST /works/updateWorks */
export async function updateWorks(body: MediaService.BizWorks, options?: { [key: string]: any }) {
  return request<MediaService.ResultBizWorks>(`/media/works/updateWorks`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  })
}
